<?php
namespace Users\Controller;
use Think\Controller;
class BaseController extends Controller {

	function _initialize() {
		header("Content-Type: text/html; charset=utf-8");
		//根据域名获取appid
		$this->app = D('Apps');
		//$map['domain|self_domain'] = $_SERVER['SERVER_NAME'];
		$appinfo = $this->app->where($map)->find();
		if($appinfo){
			$_SESSION['appinfo'] = $appinfo;
		}else{
			die('访问的域名不存在');
		}
	}
}